/**
 *
 */
package com.shuaqiu.simback.model;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * @author qiushaohua
 *
 */
public class Model {

    protected Integer id;

    private final Map<String, Object> fields = new HashMap<String, Object>();

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Object getFieldValue(String field) {
        return fields.get(field);
    }

    public void addField(String field, Object value) {
        fields.put(field, value);
    }

    public void addAllField(Map<String, Object> fields){
        this.fields.putAll(fields);
    }
}
